<?php
header("Content-Type: text/html; charset=utf-8");
require_once '../smarty/Smarty.class.php';
require_once '../lib/pagination.php';
require_once '../lib/query_railway.php';
require_once '../lib/base.php';
$user=$_SESSION["RU"];

$id=$_GET["i"];
if($id>0){
	$str=" id=$id";
	$rule=QR::get_data($tb_bl, "*",$str,0,1);

	$str=" status='true' order by creattime desc";
	$data=QR::get_data($tb_bl, "*",$str,0,5);	
}

$smarty = new Smarty;
$smarty->assign("user",$user);
$smarty->assign("userdata",$data);
$smarty->assign("rule",$rule[0]);
$smarty->display("bl_view.tpl");

function change_c($content){
	return "<p>".str_replace(array("\r","\n"),"<p>",$content);
}
?>